package com.bw.servlet;

import com.bw.dao.GoodsDao;
import com.bw.pojo.Goods;
import lombok.SneakyThrows;

import javax.servlet.ServletException;
import javax.servlet.annotation.WebServlet;
import javax.servlet.http.HttpServlet;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import java.io.IOException;
import java.util.List;

/***************************
 FileAction:

 CreateTime:2022-07-29 16:52
 Author:Asking-mac
 ****************************/
@WebServlet("/SelectOrderPriceServlet")
public class SelectOrderPriceServlet extends HttpServlet {
    protected void doPost(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {
        doGet(request, response);
    }

    @SneakyThrows
    protected void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {
        List<Goods> list = new GoodsDao().selectAllGoodsOrderPrice();

        request.setAttribute("list",list);


        request.getRequestDispatcher("message.jsp").forward(request,response);
    }
}
